#ifndef _MATH_H
#define _MATH_H

/*
* Basic mathematical functions and common definitions 
*/

#include <math.h>
#include <limits>

//Real definition (double or float)
typedef float Real;

//#undef TWO_PI
#undef EPSILON

class Math{
public:
	static Real radianToDegree(Real radian);
	static Real degreeToRadian(Real degree);
	static bool isRealEqual(Real a, Real b, Real tolerance = std::numeric_limits< Real >::epsilon());
	static Real abs(Real x);
	static Real sgn( Real x){
		return (x<0)?-1:((x==0)?0:1);
	}

	static const double PI;
	static const double EPSILON;
};

#endif